package com.fanco.learn_datastruct_leetcode.designpattern.adapter.objectadapter;

/**
 * @author qiaowang 2022/2/10
 * 描述
 */
public class VoltageAdapter implements IVoltage5V {

    private Voltage220V voltage220V;

    public VoltageAdapter(Voltage220V voltage220V) {
        this.voltage220V = voltage220V;
    }

    @Override
    public int output5V() {

        // 获取220电压
        int src = this.voltage220V.output220V();
        int dstV = src / 44;

        return dstV;
    }
}
